﻿using System;
using RepositoryFramework.Services;
using Portal.Model;
using Portal.Models.SkillsCatalog;

namespace Portal.Logic.Services.SkillsCatalog
{
	/// <summary>
	/// Interface <see cref="ICurriculumVitaeService"/> declare curriculum vitae service
	/// </summary>
	public interface ICurriculumVitaeService : IServiceBase<ICurriculumVitae>
	{
		/// <summary>
		/// Gets the cv by user.
		/// </summary>
		/// <param name="user">The user.</param>
		/// <returns>CV</returns>
		ICurriculumVitae GetBy(IUser user);

		/// <summary>
		/// Gets the cv preview by user.
		/// </summary>
		/// <param name="user">The user.</param>
		/// <returns>CV preview</returns>
		ICurriculumVitaePreview GetPreviewBy(IUser user);

		/// <summary>
		/// Determines whether cv is up to date on the specified date.
		/// </summary>
		/// <param name="cv">The cv.</param>
		/// <param name="onDate">The date.</param>
		/// <returns></returns>
		bool IsUpToDate(ICurriculumVitae cv, DateTime onDate);
	}
}